﻿
using UnityEngine;

public class ChatHandler : IMsgHandler
{
	public void Handle(RecData data)
	{
		MyLog.LogError("Deal Msg " + data.ID + " , " + data.Content);
		switch (data.ID)
		{
			case MethodDef.TestSend:
				MyLog.Log("Test");
				break;
			case  MethodDef.LoginCB:
				MyLog.Log("Login Callback : " + data.Content);
				break;
			case MethodDef.Chat:
				ChatData cd = JsonUtility.FromJson<ChatData>(data.Content);

				MyLog.Log("Receive Msg : " + cd.Text + " From " + cd.WID);
				break;
		}
	}
}
